import { View } from "../../../mvc/core/View";
import { LayerManager } from "../../manager/LayerManager";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { GameManager } from "../../manager/GameManager";
import { GameController } from "../../mvc/GameController";
import { HighlightManager } from "../../manager/HighlightManager";
import { ObjectPool } from "../../../../com/gengine/utils/pools/ObjectPool";
import { EffectManager } from "../../manager/EffectManager";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
import { SecTimerView } from "../common/SecTimerView";
type int = number;
//class FGIconView
    
    export  class FGIconView extends View
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._iconBtn = ObjCreate.createGLoadedButton(ResFileConst.FootballGuessBtn, 0, 0, 60, 50, this);
            this.addChild(this._iconBtn);
            this._iconBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onIconBtnClick);
            return;
        }

        /* internal  */onIconBtnClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            GameManager.instance.popupView(GameController.footballGuess.view);
            return;
        }

        /* internal  */flicker(): void
        {
            HighlightManager.instance.glowEffectButton(this._iconBtn, true);
            return;
        }

        /* internal  */showLightMask(): void
        {
            if (!this._lightMask) 
            {
                this._lightMask = ObjectPool.getObject(LightMask);
                this._lightMask.transform.matrix = new Object /* flash.geom.Matrix */();
                this._lightMask.x = 2;
                this._lightMask.y = 2;
                this._lightMask.scaleX = 65 / 42.5;
                this._lightMask.scaleY = 55 / 42.5;
                this._iconBtn.addChild(this._lightMask);
            }
            return;
        }

        public /* override */ show(arg1: int=0, arg2: int=0): void
        {
            super.show(arg1, arg2);
            EffectManager.glowFilterReg(this._iconBtn, FGIconView.filterArr, 0.8, 10, 5, 20);
            return;
        }

        /* internal */ static /* const */filterArr: Array<any>=[new Object /* flash.filters.GlowFilter */(16777062, 1, 6, 6, 4)];

        /* internal */ /* var */_lightMask: LightMask;

        /* internal */ /* var */_iconBtn: GLoadedButton;

        /* internal */ /* var */_leftTime: SecTimerView;
    }
